#include "map.h"
#include "snake.h"
#include "share.h"
#include "controler.h"
#include "fresh.h"
#include <windows.h>

void game(){
    createMap();
    initSnake();
    createFood();
    moveInterval = 350;
    score_unit = 1;
    score = 0;
    fresh(1);
    while (mode_now == 1){
        snakeMove(); 
        fresh(1);
        Sleep(moveInterval);
    }
    SetConsoleActiveScreenBuffer(GetStdHandle(STD_OUTPUT_HANDLE)); 
    system("cls");
}